#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_log.h>
#include <cJSON.h>

#include "systeminit.h"

extern "C" void app_main(void)
{
    ESP_LOGI(pcTaskGetName(nullptr), "system start [%ld]", xTaskGetTickCount());
    system_init();
    ESP_LOGI(pcTaskGetName(nullptr), "system scusses [%ld]", xTaskGetTickCount());
    // float vbus = 0.0f;
    for(;;) {
        vTaskDelay(pdMS_TO_TICKS(1000));
        // uint16_t angle = encoder_device_get().raw_code_read();
        // ESP_LOGI(pcTaskGetName(nullptr), "mt6701 angle [%d]", angle);
    }
}
